/**
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use "@angular/material" as mat;

$TOOLBAR_BACKGROUND: mat.m2-get-color-from-palette(mat.$m2-indigo-palette, 100);

.log-body-view-root {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-areas: "header" "toolbar" "logbody";
  grid-template-rows: auto 27px minmax(0, 1fr);

  khi-log-header {
    grid: "header";
  }

  .toolbar {
    grid: "toolbar";
    display: flex;
    justify-content: flex-end;
    column-gap: 1px;
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    background-color: $TOOLBAR_BACKGROUND;
  }

  .log-body-container-wrap {
    grid: "logbody";
  }
}

.log-body-container-scrollable {
  overflow: auto;

  // Force showing scrollbar
  &::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 7px;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: #3f51b5;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
  }

  code.hljs {
    padding: 0;
    white-space: pre;
  }
}

.empty-message {
  font-weight: 600;
  color: mat.m2-get-color-from-palette(mat.$m2-gray-palette, 700);
  text-align: center;
  margin: 20px;
}
